<template>
  <div class="login">
    <div class="logincontent d-f d-ai-center d-jc-between">
      <div class="left">
        <img src="../assets/Login/login.gif" alt="">
      </div>
      <div class="right">
        
        <el-form class="tiptop" @submit.native.prevent="save" label-width="80px">
          <div class="titlelogin">后台管理</div>
          <el-form-item label="用户名:">
            <el-input v-model="model.username" placeholder="请输入您的用户名"></el-input>
          </el-form-item>
          <el-form-item label="密码:">
            <el-input v-model="model.password" type="password" placeholder="请输入您的密码" show-password></el-input>
          </el-form-item>
          <el-form-item class="d-f d-ai-centet d-jc-end">
            <el-button type="primary" native-type="submit">确认登陆</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from 'vue-property-decorator'
@Component({

})
export default class extends Vue {
  model = {
    username:'',
    password:''
  }
  save(){
    if(!this.model.username) return this.$message.error('请输入用户名')
    if(!this.model.password) return this.$message.error('请输入密码')
    this.$router.push('/content')
  }
}
</script>

<style scoped>

</style>
